docs: Publish man pages
authorDan Nicholson <dbn@endlessos.org>
Fri, 8 Apr 2022 21:30:07 +0000 (15:30 -0600)
committerDan Nicholson <dbn@endlessos.org>
Sat, 9 Apr 2022 01:25:32 +0000 (19:25 -0600)
Make a copy of `man/html` to `docs/man` and then configure Jekyll to
include it verbatim like the API docs. A link is added to the main index
and the necessary commands are added to the github docs workflow.

.github/workflows/docs.yml
docs/_config.yml
docs/index.md
docs/prep-docs.sh

index fe120fded9fa2b96fbdb0f3835360f2e74ee25ff..72fde7ad73ebcbf1e1b06d1b53bdff8e29c42c6b 100644 (file)
@@ -26,10 +26,11 @@ jobs:
       - name: Install dependencies
         run: ./ci/installdeps.sh
 
-      - name: Build API docs
+      - name: Build API docs and manpages
         run: |
-          ./autogen.sh --enable-gtk-doc
+          ./autogen.sh --enable-gtk-doc --enable-man --enable-man-html
           make -C apidoc
+          make manhtml
 
       - name: Build and publish jekyll docs
         uses: helaili/jekyll-action@v2
index ed1c2a63105a6f99345ce0f7134300a1d4e56091..991d2adc319145c1ec0865cb95fe4a0f054403ed 100644 (file)
@@ -20,9 +20,9 @@ exclude:
   - prep-docs.sh
   - vendor/
 
-# This is a copy of the apidoc/html directory. Run prep-docs.sh before
-# jekyll to put it in place.
-include: [reference]
+# These are copies of the apidoc/html and man/html directories. Run
+# prep-docs.sh before jekyll to put it in place.
+include: [reference, man]
 
 remote_theme: coreos/just-the-docs
 plugins:
index db729be3227eef9659bca201237cc63fdc8f2ade..b1c4da3badf88c9a64f2f31e2c1a448f58d4c3d9 100644 (file)
@@ -146,6 +146,10 @@ make install DESTDIR=/path/to/dest
 
 The libostree API documentation is available in [Reference](reference/).
 
+## Manual Pages
+
+The ostree manual pages are available in [Manual](man/).
+
 ## Contributing
 
 See [Contributing]({{ site.baseurl }}{% link CONTRIBUTING.md %}).
index 2ae15a741188a8c3e409ea1a349ee4e74a9d3069..5975d5ccc498bf9fe0aa029cd7154287507b34d4 100755 (executable)
@@ -21,3 +21,17 @@ fi
 echo "Copying $apidocs to $refdir"
 rm -rf "$refdir"
 cp -r "$apidocs" "$refdir"
+
+# Make sure the manpages have been generated and copy them to the man
+# directory.
+manhtml="$topdir/man/html"
+mandir="$docsdir/man"
+if [ ! -d "$manhtml" ]; then
+    echo "error: HTML manpages $manhtml have not been generated" >&2
+    echo "Rebuild with --enable-man option and run `make manhtml`" >&2
+    exit 1
+fi
+
+echo "Copying $manhtml to $mandir"
+rm -rf "$mandir"
+cp -r "$manhtml" "$mandir"